<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<script src="https://unpkg.com/vue@next">

</script>

<div id="app">
    <!-- 如果多余一个空格，仍然会存在一个空格   -->
    <input v-model.trim="msg"/>
    <span>msg:{{msg}}</span>
</div>

<script>
    const vueOpt = {
        data() {
            return {
                msg: ''
            }
        }
    }

    Vue.createApp(vueOpt).mount('#app')
</script>
</body>
</html>
